﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Unijovem.Domain;

namespace Unijovem.UI.Models
{
    public class ForumModel : ModelBase<ForumModel, Forum>
    {
        [Required(ErrorMessage = "*")]
        [DisplayName("Tema")]
        public int IdTema { get; set; }
        
        public TemaModel Tema { get; set; }

        [Required(ErrorMessage = "*")]
        [DisplayName("Assunto")]
        public string Assunto { get; set; }

        [Required(ErrorMessage = "*")]
        [DisplayName("Texto Base")]
        public string TextoBase { get; set; }

        [Required(ErrorMessage = "*")]
        [DataType(DataType.DateTime, ErrorMessage = "Data inválida")]
        [DisplayName("Data início")]
        public DateTime DataInicio { get; set; }

        [Required(ErrorMessage = "*")]
        [DataType(DataType.DateTime, ErrorMessage = "Data inválida")]
        [DisplayName("Data final")]
        public DateTime? DataFinal { get; set; }

        public List<ForumComentarioModel> ForumComentarios { get; set; }
    }
}